/**
 * @author LKQ
 * @date 2022/1/30 13:13
 * @description
 */
public class ParkingSystem {
    int big;
    int medium;
    int small;
    public ParkingSystem(int big, int medium, int small) {
        this.big = big;
        this.medium = medium;
        this.small = small;
    }

    /**
     * @param carType 汽车类型， 1-大，2-中，3-小
     * @return 能否停车
     */
    public boolean addCar(int carType) {
        if (carType == 1) {
            if (big <= 0) {
                return false;
            }
            big--;
        }
        if (carType == 2) {
            if (medium <= 0) {
                return false;
            }
            medium--;
        }
        if (carType == 3) {
            if (small <= 0) {
                return false;
            }
            small--;
        }
        return true;
    }
    public static void main(String[] args) {

    }
}
